package com.tf_cut.backend.sms.controller;

import com.alibaba.fastjson.JSON;
import com.tf_cut.backend.datadic.vo.DatadicVo;
import com.tf_cut.backend.sms.service.ISmsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/backend")
@Slf4j
public class SmsController {

    @Autowired
    private ISmsService smsService;

    @GetMapping("/sms/getSmsCode")
    public String sendSms(@RequestParam String mobile){
        log.debug("mobile:"+mobile);
        String code = smsService.sendSms(mobile);
        return code;
    }
}
